<?php
use Psr\Http\Message\ResponseInterface as Response;
use Psr\Http\Message\ServerRequestInterface as Request;
use Slim\Factory\AppFactory;
 
require_once __DIR__ . '/../vendor/autoload.php';
 
$app = AppFactory::create();
 
$app->get('/', function (Request $request, Response $response) {
    $response->getBody()->write('你好，欢迎来到Slim框架！');
    return $response;
});
 
$app->run();